import LangView from "./LangView";

const { ccclass, property } = cc._decorator;

@ccclass
export  class LangLabel extends LangView {
    
    updateValue() {
        let label = this.node.getComponent(cc.Label);
        //
        if (label) {
            let str = this.manager.getValue(this.langID,this.opt);
            if(str){
                label.string = str;
            }
           
        } else {
            let richLabel = this.node.getComponent(cc.RichText); 
            if (richLabel) {
                let str = this.manager.getValue(this.langID,this.opt);
                if(str){
                    richLabel.string = str;
                }
               
            }
        }
    }

}
